package com.xsmart.oa.api;

import com.xsmart.common.entity.RequestBean;
import com.xsmart.oa.services.SystemConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 *
 * @author lxh
 * @date 2017/11/29
 */
@Controller
@RequestMapping("/api")
public class SystemParamConfigController {
@Autowired
    SystemConfigService systemConfigService;
    @RequestMapping(value="/v1/insertSystemConfig/insertSystemParamConfig",method = RequestMethod.POST)
    @ResponseBody
    public Object insertSystemParamConfig(@ModelAttribute RequestBean requestBean, HttpServletRequest httpServletRequest){
        return  systemConfigService.insertSystemParam(requestBean);
    }
    @RequestMapping(value="/v1/updateSystemConfig/updateSystemParamConfig",method = RequestMethod.POST)
    @ResponseBody
    public Object updateSystemParamConfig(@ModelAttribute RequestBean requestBean, HttpServletRequest httpServletRequest){
        return  systemConfigService.updateSystemParam(requestBean);
    }
    @RequestMapping(value="/v1/querySystemConfig/querySystemParamConfig",method = RequestMethod.POST)
    @ResponseBody
    public Object querySystemParamConfig(@ModelAttribute RequestBean requestBean, HttpServletRequest httpServletRequest){
        return  systemConfigService.querySystemParam(requestBean);
    }

}
